package com.xykj.mapper;

import com.xykj.common.entry.ChinaIndex;
import com.xykj.common.entry.HkFundFlow;
import com.xykj.pojo.dto.HKFundFlowDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
@Mapper
public interface HKFundFlowMapper {
    @Select("select board_name as boardName," +
            "quota as quota," +
            "net_buy as netBuy" +
            " from hk_fund_flow where is_deleted=0 and" +
            " data_time >= #{date} " +
            "and data_time < DATE_ADD(#{date}, INTERVAL 1 DAY)" )
    List<HKFundFlowDto> queryHKFundFlow(Date date);

    /**
     * 爬虫存储数据
     * @param list
     */
    void batchInsert(List<HkFundFlow> list);
    List<HkFundFlow> queryAll();

    void batchDelete(@Param("ids") List<Long> ids);
    List<Long> selectExistingIds();
}
